<?php
/* This function is php5 only. fuck php4. literally. */

class xmlhtml {

    private $xsltproc;
    private $dom;

    public $html;
    public $xml;
    public $gentime;
    public $cachevar;   //This will store an array that we can store in memcache for quick display.

    //Lets constuct the class, by creating the nessicary dom varibles and objects
    function __construct() {
        $this->xsltproc = new XsltProcessor();
    }

		function load_xsl($xslDom) {
				$tempDom = new DomDocument;
				$tempDom->load($xslDom);
				return $this->xsltproc->importStylesheet($tempDom);
		}
		
	function xmltohtml($xmlDoc) {
		// transform the XML into HTML using the XSL file
		if ($html = $this->xsltproc->transformToXML($xmlDoc)) {
//			$this->xml  = $this->dom->saveXML();
			$this->html = $html;
			return $this->html;
		}
	}
		
    function print_xml() {
        echo $this->dom->saveXML();
    }

}

?>
